<nav id="navbar" class="bd-navbar navbar is-spaced is-fixed-top">
    <div class="container">
        <div class="navbar-brand">
            <a class="navbar-item" href="{{ request.url_root }}">
                <img src="{{ url_for('static', filename='logo.png') }}">
            </a>

            <a role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false"
               data-target="navbarBasicExample">
                <span aria-hidden="true"></span>
                <span aria-hidden="true"></span>
                <span aria-hidden="true"></span>
            </a>
        </div>
        <div id="navbarBasicExample" class="navbar-menu">
            <div class="navbar-start">
                <a class="navbar-item{% if request.endpoint == 'www.welcome' %} is-active{% endif %}"
                   href="{{ request.url_root }}">首页</a>
                {% for item in menus %}
                <a class="navbar-item{% if request.view_args.get('path') == item.path or article and item.id == article.category_id %} is-active{% endif %}"
                   href="{{ item.url }}">
                    {{ item.title }}
                </a>
                {% endfor %}
            </div>
        </div>
    </div>
</nav>